package open.tech.dawn.rest.module.system.enums;

public enum SexEnum {
    BOY(1, "男"),
    GIRL(2, "女");

    private Integer value;

    private String desc;

    SexEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static open.tech.dawn.rest.module.system.enums.SexEnum getSex(Integer value) {
        if (value == null)
            return null;
        for (open.tech.dawn.rest.module.system.enums.SexEnum sexEnum : open.tech.dawn.rest.module.system.enums.SexEnum.values()) {
            if (sexEnum.value.intValue() == value.intValue())
                return sexEnum;
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }
}
